package com.campus.counseling.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.campus.counseling.model.common.Result;
import com.campus.counseling.model.query.TestResultQuery;
import com.campus.counseling.model.vo.TestResultVO;
import com.campus.counseling.service.TestResultService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "测试结果管理")
@RestController
@RequestMapping("/api/test-results")
@RequiredArgsConstructor
public class TestResultController {

    private final TestResultService testResultService;

    @Operation(summary = "分页查询测试结果")
    @GetMapping("/page")
    public Result<Page<TestResultVO>> getResultPage(TestResultQuery query) {
        Page<TestResultVO> page = testResultService.getResultPage(query);
        return Result.success(page);
    }
} 